Skip to content

fix: Return error if no tx inputs provided in submit_proven_transaction#1852

Merged
bobbinth merged 2 commits intonextfrom
sergerad-tx-inputs-err
Mar 27, 2026
Merged

fix: Return error if no tx inputs provided in submit_proven_transaction#1852
bobbinth merged 2 commits intonextfrom
sergerad-tx-inputs-err

Conversation

@sergerad
Copy link
Copy Markdown
Collaborator

Closes #1850.

@sergerad sergerad added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Mar 27, 2026
@sergerad sergerad requested review from Mirko-von-Leipzig and bobbinth and removed request for bobbinth March 27, 2026 00:56
@bobbinth bobbinth requested a review from igamigo March 27, 2026 01:34
Copy link
Copy Markdown
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you! I've also tagged @igamigo for review to make sure the client sends the tx inputs under all conditions.

Copy link
Copy Markdown
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! In the client this is enforced at the RPC trait level, so there should be no problem.

    async fn submit_proven_transaction(
        &self,
        proven_transaction: ProvenTransaction,
        transaction_inputs: TransactionInputs,
    ) -> Result<BlockNumber, RpcError>;

@bobbinth bobbinth merged commit bbe2e3f into next Mar 27, 2026
28 of 30 checks passed
@bobbinth bobbinth deleted the sergerad-tx-inputs-err branch March 27, 2026 05:09
Comment on lines +419 to +420
} else {
return Err(Status::invalid_argument("Transaction inputs must be provided"));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi this can be written as

let request = request.transaction_inputs.ok_or(Err(...))?;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Require TransactionInputs or error on None in submit_proven_transaction

4 participants